In the fields of semiconductor devices, flat panel displays, and micro electro mechanical systems (MEMS), and so on, a structure having micro patterns formed on its surface (hereinafter referred to as a “microstructure”) is manufactured, for example, by lithographic technology.
An optical inspection apparatus is used for the inspection of such a microstructure. The conventional optical inspection apparatus applies a light to an inspection target pattern formed on a substrate such as a wafer from, for example, a laser light source or a lamp light source, detects a reflected light from the pattern by a detector, and compares the signal intensity of the detected light by, for example, die-to-die comparison, thereby conducting a defect inspection. Recently, patterns having high aspect ratios have been produced due to advanced miniaturization and integration of the microstructures. For example, in a trench pattern having a high aspect ratio, defects can be generated at various positions in a depth direction. Therefore, when it is judged that there is a defect, a correct judgment of its position in the depth direction is required.